package com.xxl.rpc.sample.server.conf;

import javax.annotation.Resource;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.annotation.Configuration;

import com.xxl.rpc.sample.api.DemoService;

/**
 * xxl-job config config配置参数
 *
 * @author xuxueli 2017-04-28
 */
@Configuration
public class XxlJobAdminConfig implements InitializingBean {

	private static XxlJobAdminConfig adminConfig = null;

	public static XxlJobAdminConfig getAdminConfig() {
		return adminConfig;
	}

	@Override
	public void afterPropertiesSet() throws Exception {
		adminConfig = this;
	}

	// ----------------------注册服务--------------------------
	@Resource
	public DemoService demoService;

	public DemoService getDemoService() {
		return demoService;
	}

}
